package org.apache.commons.logging.impl.weakhashtableutils;

import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;

/**
 * WeakReference subclass that holds a hard reference to an
 * associated <code>value</code> and also makes accessible
 * the Referenced object holding it.
 */
final class WeakKey extends WeakReference {

    private final Referenced referenced;
    
    WeakKey(Object key, 
                    ReferenceQueue queue,
                    Referenced referenced) {
        super(key, queue);
        this.referenced = referenced;
    }
    
    Referenced getReferenced() {
        return referenced;
    }
}